package com.java.observer.jdk;

public class Test {

    public static void main(String[] args) {
        TeacherSubject teacherSubject = new TeacherSubject();

        StudentObserver zs = new StudentObserver("张三");
        StudentObserver ls = new StudentObserver("李四");
        teacherSubject.addObserver(zs);
        teacherSubject.addObserver(ls);

        teacherSubject.setHomework("学习java");
    }
}
